
function clearCache() {
    window.CacheClear(function() {
        document.getElementById("clear1").innerHTML = "清除成功";
    }, function(){
        document.getElementById("clear1").innerHTML = "清除失败";
    });
}

function clearData() {
    ClearData.cache(function() {
        document.getElementById("clear2").innerHTML = "清除成功";
    }, function(err) {
        document.getElementById("clear2").innerHTML = "清除失败";
    });
}

function clearBrowserCache() {
    CordovaClearCache.webViewClearCache(true, function(){
        document.getElementById("clearCache").innerHTML = "清除成功";
    },function(){
        document.getElementById("clearCache").innerHTML = "清除失败";
    });
}

function clearAppData() {
    CordovaClearCache.clearExternalCache(true, function(){
        document.getElementById("clearData").innerHTML = "清除成功";
    },function(){
        document.getElementById("clearData").innerHTML = "清除成功";
    });
    //或者下面的，没有外部缓存
    //CordovaClearCache.clearCacheOnly();
}
